package Lecture6;

import java.util.Scanner;

public class ClassTask9and10 {

	public static void main(String[] args) {

		Scanner sc = new Scanner (System.in);
		
		System.out.println("Enter a value \"n\"");
		int n = sc.nextInt();
		
		StringBuilder sb = new StringBuilder();
		
		for (int i =0; i<n+1; i++)
		{
			sb.append(i);
		}
		
		System.out.println(sb);
		
		System.out.println("Enter a value \"m\"");
		String m = sc.next();
		
		int a = 0;
		
		a = sb.indexOf(m);
		
		System.out.println("The index of \"m\" is: " + a);
		
		
	}

}
